From: Ian Douglas Scott Date: Fri, 30 Oct 2020 16:57:40 +0000 (-0700) Subject: appDisplay: Only show add/remove favorite when shouldShowApp() is true X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~766 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c86c294d2a8cf29be95a98881bbee4a25e92524b;p=gnome-shell.git appDisplay: Only show add/remove favorite when shouldShowApp() is true `shouldShowApp()` is called in `_addFavorite`, so adding a favorite when this isn't true won't work. Also, it seems when this is false, favorites that do exist won't be shown anyway. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3342 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 64da2e636..8e10de2d8 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2883,6 +2883,8 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu { this._source = source; + this._parentalControlsManager = ParentalControlsManager.getDefault(); + this.actor.add_style_class_name('app-well-menu'); // Chain our visibility and lifecycle to that of the source @@ -2963,7 +2965,8 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu { }); } - let canFavorite = global.settings.is_writable('favorite-apps'); + let canFavorite = global.settings.is_writable('favorite-apps') && + this._parentalControlsManager.shouldShowApp(this._source.app.app_info); if (canFavorite) { this._appendSeparator();